import Http, {HttpParamsProps, ReqProps} from "@/common/http";
import {BaseEntitys} from "@/common/httptypes";

// 授信-催单次数-催单通知


//后期需整改数据-没用的删掉
export type SysNoticeEntity = {
  id: string
  deptId?: string
  haveRead?: boolean
  notContainType?: string
  paramInfo?: string
  receiverUserId?: string
  sendType?: string
  title: string
  type?: string
} & BaseEntitys


class SysNotide {
    RowKey = "id"
    EDIT = "noticeUpdate"
    ADD = "noticeAdd"
    DEL = "noticeDelete"
    
    MAPPING = {noticeUpdate: "编辑通知", noticeAdd: "新增通知"}


    selectTablePage(props: HttpParamsProps): Promise<Response> {
        return Http.get("/notice/select", props)
    }

    doEdit(props: ReqProps<void>) {
        Http.doPost("/notice/updateById", props)
    }
    doSave(props: ReqProps<void>) {
        Http.doPost("/notice/save", props)
    }

    delete(props: ReqProps<void>) {
        Http.doDelete("/notice/deleteById", props)
    }

}

// eslint-disable-next-line import/no-anonymous-default-export
export default new SysNotide()